import axios from "@/libs/api.request";

//设备
export const getDeviceList = data => {
  return axios.request({
    params: data,
    url: "/bss/dev/list",
    method: "get"
  });
};

export const saveDevice = data => {
  return axios.request({
    data: data,
    url: "/bss/dev/save",
    method: "post",
    headerType: "json"
  });
};

export const updateDevice = data => {
  return axios.request({
    data: data,
    url: "/bss/dev/update",
    method: "post",
    headerType: "json"
  });
};

export const delDevice = data => {
  return axios.request({
    data: data,
    url: "/bss/dev/delete",
    method: "post",
    headerType: "json"
  });
};

export const resetLoc= data => {
  return axios.request({
    data: data,
    url: "/bss/dev/resetloc",
    method: "post",
    headerType: "json"
  });
};



export const paramConfigInfo = () => {
  return axios.request({
    url: "/bss/setting/info",
    method: "get",
  });
};

export const updateParamConfig = (data) => {
  return axios.request({
    data: data,
    url: "/bss/setting/update",
    method: "post",
    headerType: "json"
  });
};

export const sendingHisList = (data) => {
  return axios.request({
    params: data,
    url: "/bss/send/list",
    method: "get"
   
  });
};

// sim 
export const getSimList = data => {
  return axios.request({
    params: data,
    url: "/bss/sim/list",
    method: "get"
  });
};

export const delSim = data => {
  return axios.request({
    data: data,
    url: "/bss/sim/delete",
    method: "post",
    headerType: "json"
  });
};

//注册记录
export const getRegisterList = data => {
  return axios.request({
    params: data,
    url: "/bss/reg/list",
    method: "get"
  });
};

//配置位号编码
export const installDevice = data => {
  return axios.request({
    data: data,
    url: "/bss/dev/install",
    method: "post",
    headerType: "json"
  });
};

//批量配置位号编码
export const batchInstallDevice = data => {
  return axios.request({
    data: data,
    url: "/bss/dev/install_batch",
    method: "post",
    headerType: "json"
  });
};

// 设置工作状态
export const getInstalledDeviceList = data => {
  return axios.request({
    params: data,
    url: "/bss/dev/devs",
    method: "get"
  });
};

export const sendConfig = data => {
  return axios.request({
    data: data,
    url: "/bss/dev/send",
    method: "post",
    headerType: "json"
  });
};